<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- <input type="checkbox" name="" id="" checked> -->
</body>
</html>
<script>
    let arr = []
    let obj = {
        title:'十天速成马甲线 ！ 教程来了😏', //商品名称
        OriginalPrice:300, //原本价格
        FavorablePrice:200,//优惠价格
        goodsNum:1, //数量
        goodsstyle:'床垫*120*200cm（升级款', //款式，
        goodscolour:'白色',
        checked:false,//是否被选中
        imgUrl:'https://yanxuan-item.nosdn.127.net/1117f14f335da41feb63a4c20235ed94.png?type=webp&imageView&thumbnail=160x0&quality=75'
    }
    arr.push(obj)
    
    localStorage.setItem('carts',JSON.stringify(arr))
    // eval('('++')')
    console.log(JSON.parse(localStorage.getItem('carts')))
</script>